<!doctype html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<title>管理员登录</title>
		<link href="/static/admin/Css/layout.css" rel="stylesheet" type="text/css">
		<link href="/static/admin/Css/login.css" rel="stylesheet" type="text/css">
		<script type="text/javascript" src="/static/admin/Js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/static/admin/Js/js.js"></script>
	</head>
	<style>
		.ibar {display: none;}
	</style>
	<body class="login-bg">
		<div class="main ">
			<!--登录-->
			<div class="login-dom login-max">
				<div class="logo text-center">
					<a href="#">
					<img src="/static/admin/Images/logo.png" width="180px" height="180px">
					</a>
				</div>
				<div class="login container " id="login">
					<p class="text-big text-center logo-color">
						管理员登录
					</p>
					<!-- <p class=" text-center margin-small-top logo-color text-small">
						控制台 | 云平台 | 论坛 | 云市场
					</p> -->
					<form class="login-form" action="index.html" method="post" autocomplete="off">
						<div class="login-box border text-small" id="box">
							<div class="name border-bottom">
								<input type="text" placeholder="管理员账号" id="username" name="username" datatype="*" nullmsg="管理员账号">
							</div>
							<div class="pwd">
								<input type="password" placeholder="管理员密码" datatype="*" id="password" name="password" nullmsg="管理员密码">
							</div>
						</div>
						<input type="hidden" name="formhash" value="5abb5d21"/>
						<input type="button" class="btn text-center login-btn" id="login" value="立即登录">
					</form>
					<div class="forget">
						<a href="javascript:;" id="send" class="forget-pwd text-small fl"></a>
					</div>
				</div>
			</div>
			<div class="popupDom">
				<div class="popup text-default">
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="/static/admin/Js/Validform_v5.3.2_min.js"></script>
	<script type="text/javascript">

		$("#login").click(function() {
			var username = $("input[name=username]");
			var password = $("input[name=password]");

			if (username.val() == "") {
				popup("请输入管理员账号")
				username.focus();
				return false;
			}
			if (password.val() == "") {
				popup("请输入管理员密码")
				password.focus();
				return false;
			}
			$.post("login_post", {
				username: username.val(),
				password: password.val(),
			}, function(res) {
				if (res.code == 0) {
					popup(res.message);
					var url = '/admin/index';
					setTimeout("window.location='" + url + "'", 2000);

				} else{
					popup(res.message);

					return false;
				}
			}, 'json');
		});
	</script>

</html>